/*
 * 基础信息请求
 * 240904
 *
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "@/store/utils";

// 获取项目详情
export const getProjectInfo = (params?: object) => {
  return http.request("get", baseUrlApi("project/info"), { params });
};

// 保存项目详情
export const saveProjectInfo = (data?: object) => {
  return http.request("post", baseUrlApi("project/update"), { data });
};

// 删除项目详情
export const delProjectInfo = (data?: object) => {
  return http.request("post", baseUrlApi("project/delete"), { data });
};

// 获取项目成员列表
export const getProjectMemberList = (params?: object) => {
  return http.request("get", baseUrlApi("projectMember/list"), { params });
};

// 删除项目成员
export const delProjectMember = (data?: object) => {
  return http.request("post", baseUrlApi("projectMember/delete"), { data });
};

// 用户密码重置
export const passwordReset = (data?: object) => {
  return http.request("post", baseUrlApi("system/userLogin/password/reset"), { data });
};

// 用户默认密码
export const getPasswordDefault = (params?: object) => {
  return http.request("get", baseUrlApi("system/userLogin/password/default"), { params });
};

// 删除用户
export const userDelete = (data?: object) => {
  return http.request("post", baseUrlApi("user/delete/id"), { data });
};

// 用户保存
export const userSave = (data?: object) => {
  return http.request("post", baseUrlApi("user/save"), { data });
};
// 用户同步
export const userSync = (data?: object) => {
  return http.request("post", baseUrlApi("user/sync/mdm"), { data });
};

// 新增/保存 项目成员
export const saveProjectMember = (data?: object) => {
  return http.request("post", baseUrlApi("projectMember/save"), { data });
};

// 获取企业列表
export const getDeptList = (params?: object) => {
  return http.request("get", baseUrlApi("dept/list"), { params });
};

// 获取地区列表
export const getAreaList = (params?: object) => {
  return http.request("get", baseUrlApi("baseArea/getMap"), { params });
};
